<?php

namespace EasyFeiShu\Attendance;

use EasyFeiShu\Core\AbstractAPI;
use Supports\Collection;

class UserFlow extends AbstractAPI
{
    const API_POST_ATTENDANCE_USER_FLOWS = 'https://open.feishu.cn/open-apis/attendance/v1/user_flows/query';

    /**
     * 批量查询打卡流水
     *
     * @param array $params 请求体
     * @param array $query 查询参数
     *
     * @return Collection
     */
    public function userStatsData(array $params = [], array $query = ['employee_type' => 'employee_id']): Collection
    {
        return $this->parseJSON('post', [
            self::API_POST_ATTENDANCE_USER_FLOWS . '?' . http_build_query($query),
            $params,
        ]);
    }
}
